<template>
	<view class="warp">
		<view class="list">
			<view @click="toinfo(item)" class="item" v-for="(item,index) in projectlist" :key="index">
				<view class="i_right">
					<image style="width: 200rpx;"  :src="item.websiteImage" mode="widthFix"></image>
				</view>
				<view class="i_left">
					<view class="title">
					 {{item.websiteTitle}}
					</view>
					<view class="time">
						<span style="display: block;">{{item.createTime.slice(0,10)}}</span>
						<span style="display: block;">{{item.createdByName}}</span>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				projectlist:[],
				queryform:{
					pageSize:20,
					current:1,
					websiteType:'12',//类型
				},
				total:0,
				
			};
		},
		onLoad() {
			this.getlist()
		},
		// 下拉
			onPullDownRefresh() {
				// 刷新位置
			this.getlist()
				var that=this
				setTimeout(function(){
						uni.stopPullDownRefresh()
					},1000)
			},
		onReachBottom(){
			if(this.queryform.pageSize*this.queryform.current>this.total){
				uni.showToast({
					title:"数据加载完毕",
					icon:'none'
				})
			}else{
				this.queryform.current++
				this.$request({
					url:'v3/website/front/member/list',
					method:'GET',
					data:this.queryform
				}).then(res=>{
					this.projectlist.push(...res.data.list)
					
				})
			}
		},
		methods:{
			getlist(){
				this.queryform.vendorId=uni.getStorageSync('storeId') 
				this.$request({
					url:'v3/website/front/member/list',
					method:'GET',
					data:this.queryform
					 
				}).then(res=>{
					if(res.state==200){
						this.projectlist=res.data.list
						this.total=res.data.pagination.total
					}
				})
			},
			// 详情
			toinfo(val){
				uni.navigateTo({
					url:"/webcont/ximageinfo/ximageinfo?id="+val.websiteId
				})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	page{
				width: 750rpx;
				margin: 0 auto;
				background: #F5F5F5;
				
			}
			.warp{
				.list{
					// padding: 20rpx 10rpx;
					
					margin-top: 10rpx;
					.item{
						padding: 20rpx;
						background-color: #fff;
						display: flex;
						justify-content: space-between;
						align-items: center;
						margin-bottom: 20rpx;
						.i_left{
							width: 500rpx;
							padding: 10rpx 30rpx;
							.title{
								text-align: center;
								// padding-left: 20rpx;
								font-size: 32rpx;
								font-weight: 500;
								overflow: hidden;
								 text-overflow: ellipsis;
								 display: -webkit-box; 
								 -webkit-box-orient: vertical;
								 -webkit-line-clamp:3;
								 height: 120rpx;
							}
							.time{
								font-size: 24rpx;
								padding: 10rpx 10rpx;
								color: #cecece;
								display: flex;
								justify-content: space-between;
								align-items: center;
								
							}
							
						}
						.i_right{
							width: 200rpx;
							// height: 120rpx;
							// background-color: red;
						}
						
				}
				
			}
			}
</style>
